<template>
  <div class="scrollbar-flex-content">
    <div v-for="item in data" class="scrollbar-demo-item">
      <div class="line wrap" style="height: 120px; align-items: flex-end">
        <div v-for="(seat, i) in item.models">
          {{ i + 1 }}:&nbsp;{{ seat.join(", ") }};
        </div>
        <!-- {{ item.models.map((seat) => seat.join(", ")).join(" // ") }} -->
      </div>
      <div class="title line between" style="height: 30px">
        <span>{{ item.title }}</span>
        <span>{{ item.modes.join(", ") }}</span>
        <span>{{ item.models.length }}扇</span>
      </div>
      <div class="line">
        <span class="cell" style="width: 60px">时间<br />Q/W</span>
        <span class="cell">评价<br />EOQ</span>
        <span class="cell">评价<br />EOW</span>
        <span class="cell">评价<br />ECQ</span>
        <span class="cell">评价<br />ECW</span>
      </div>
      <div v-for="i in moments.length" class="line">
        <span class="cell" style="width: 60px">
          {{ moments[i - 1] }}
        </span>
        <span class="cell">
          {{
            Math.round(item.evaluation.evaluationOriginalQuarter[i - 1] * 100) /
            100
          }}
        </span>
        <span class="cell">
          {{
            Math.round(item.evaluation.evaluationOriginalWhole[i - 1] * 100) /
            100
          }}
        </span>
        <span class="cell">
          {{
            Math.round(
              item.evaluation.evaluationCalibratedQuarter[i - 1] * 100
            ) / 100
          }}
        </span>
        <span class="cell">
          {{
            Math.round(item.evaluation.evaluationCalibratedWhole[i - 1] * 100) /
            100
          }}
        </span>
      </div>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  data: {
    type: Array,
    required: true,
  },
  moments: {
    type: Array,
    required: true,
  },
});
</script>

<style scoped>
@import "./subviewStyles.css";
</style>
